﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Global.asax.cs" company="ecblog.codeplex.com">
//   emrecoskun.net - ibrahimatay.com
// </copyright>
// <summary>
//   Defines the MvcApplication type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace EcBlog
{
    using System.Configuration;
    using System.Web.Http;
    using System.Web.Mvc;
    using System.Web.Optimization;
    using System.Web.Routing;

    public class MvcApplication : System.Web.HttpApplication
    {
        /// <summary>
        /// Gets the shared secret.
        /// </summary>
        /// <remarks>
        /// for unique secure blog instance, Change secret then rebuild project 
        /// </remarks>
        public static string SharedSecret
        {
            get
            {
                return "Qdsf09£s4sf" + ConfigurationManager.AppSettings["SecretKey"];
            }
        }

        protected void Application_Start()
        {
            MapperConfig.RegisterMaps();
            AreaRegistration.RegisterAllAreas();
            ModelBinderConfig.RegisterBinders(System.Web.Mvc.ModelBinders.Binders);
            DependencyResolverConfig.RegisterContainer(); 
            AuthConfig.RegisterAuth();
            WebApiConfig.Register(GlobalConfiguration.Configuration);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
        }
    }
}